﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Proposed.ascx.cs" Inherits="ERP.Modules.Proposed" %>
<%-------------------------------%>
<ext:Hidden ID="FormatTypeProposed" runat="server" />
<ext:Panel runat="server" Layout="Fit" Border="False" ID="PanelProposed">
    <Content>
        <%--------------GridProposed-----------------%>
        <ext:GridPanel
            ID="grProposed"
            Border="True"
            runat="server"
            Cls="grid-double"
            AutoWidth="true"
            AutoScroll="true"
            Width="908"
            Height="510"
            EnableColumnMove="true">
            <Store>
                <%-------------StoreProposed-----------------%>
                <ext:Store
                    ID="StoreProposed"
                    runat="server"
                    OnReadData="StoreProposed_RefreshData"
                    OnSubmitData="StoreProposed_Submit"
                    PageSize="20">
                    <Model>
                        <ext:Model ID="Model4" runat="server" IDProperty="Proposed_ID">
                            <Fields>
                                <ext:ModelField Name="Rows_ID" Type="Int" />
                                <ext:ModelField Name="Proposed_TaxCode" Type="String" />
                                <ext:ModelField Name="FullName" Type="String" />
                                <ext:ModelField Name="FullNameRespone" Type="String" />
                                <ext:ModelField Name="Proposed_DateBegin" Type="Date" />
                                <ext:ModelField Name="Proposed_DateRespone" Type="Date" />
                                <ext:ModelField Name="IsActive" Type="Boolean" />
                            </Fields>
                        </ext:Model>
                    </Model>
                </ext:Store>
            </Store>
            <ColumnModel runat="server">
                <Columns>
                    <ext:Column ID="Column1" runat="server" Text="STT" Width="35" DataIndex="Rows_ID" Align="Center"></ext:Column>
                    <ext:Column ID="Column2" runat="server" Text="ID" Width="15" DataIndex="Proposed_ID" Visible="false"></ext:Column>
                    <ext:Column ID="Column3" runat="server" Text="Chứng từ " Width="100" DataIndex="Proposed_TaxCode"></ext:Column>
                    <ext:Column ID="Column5" runat="server" Text="Người lập phiếu" Width="200" DataIndex="FullName"></ext:Column>
                    <ext:Column ID="Column4" runat="server" Text="Người duyệt" Width="200" DataIndex="FullNameRespone" Align="Left"></ext:Column>
                    <ext:DateColumn ID="DateColumn1" runat="server" Text="Ngày lập phiếu" Width="100" DataIndex="Proposed_DateBegin" Format="dd-MM-yyyy" Align="Right" Flex="1"></ext:DateColumn>
                    <ext:DateColumn ID="DateColumn2" runat="server" Text="Ngày xét duyệt" Width="100" DataIndex="Proposed_DateRespone" Format="dd-MM-yyyy" Align="Right" Flex="1"></ext:DateColumn>
                    <ext:CheckColumn ID="Column6" runat="server" Text="Trạng thái" Width="100" DataIndex="IsActive" Align="Center"></ext:CheckColumn>
                </Columns>
            </ColumnModel>
            <DirectEvents>
                <ItemDblClick OnEvent="DbClick_db">
                    <ExtraParams>
                        <ext:Parameter Name="Proposed_ID" Value="record.data.Proposed_ID" Mode="Raw"></ext:Parameter>
                    </ExtraParams>
                    <EventMask ShowMask="true" Msg="Đang tải..."></EventMask>
                </ItemDblClick>
            </DirectEvents>
            <SelectionModel>
                <ext:CheckboxSelectionModel ID="CheckboxSelectionModelProposed" runat="server" Mode="Multi">
                    <Listeners>
                        <SelectionChange Handler="
                            if (selected.length == 0) {
                                #{btnEditMain}.disable();
                                #{btnDel}.disable();
                                #{btnExport}.disable();
                                #{btnProposedReview}.disable();
                            } else {
                                #{btnEditMain}.enable();
                                #{btnDel}.enable();
                                #{btnExport}.enable();
                                #{btnProposedReview}.enable();
                            }" />
                    </Listeners>
                </ext:CheckboxSelectionModel>
            </SelectionModel>
            <DockedItems>
                <ext:Toolbar ID="ToolbarProposed" runat="server" Dock="Top">
                    <Items>
                        <ext:Button ID="btnAddNew" runat="server" Text="Thêm mới" Icon="ApplicationAdd" ToolTip="Thêm mới mua hàng">
                            <DirectEvents>
                                <Click OnEvent="MnOrderBuyWithOrder_Click">
                                    <EventMask ShowMask="true" Msg="Đang tải..." />
                                </Click>
                            </DirectEvents>
                        </ext:Button>
                        <ext:ToolbarSeparator />
                        <ext:Button ID="btnEditMain" runat="server" Text="Sửa" Icon="ApplicationEdit" ToolTip="Check vào một mẫu tin mua hàng để sửa">
                            <DirectEvents>
                                <Click OnEvent="btnEdit_Click">
                                    <EventMask ShowMask="true" Msg="Đang tải..." />
                                </Click>
                            </DirectEvents>
                        </ext:Button>
                        <ext:ToolbarSeparator />
                        <ext:Button ID="btnDel" runat="server" Text="Xoá" Icon="ApplicationDelete" ToolTip="Check vào một hoặc nhiều mẫu tin mua hàng để xoá">
                            <DirectEvents>
                                <Click OnEvent="btnDel_Click">
                                    <EventMask ShowMask="true" Msg="Đang tải..." />
                                    <ExtraParams>
                                        <ext:Parameter Name="name" Value="btnDel"></ext:Parameter>
                                    </ExtraParams>
                                    <Confirmation ConfirmRequest="true"
                                        Title="Thông Báo" Message="Bạn có muốn xoá mẫu tin này không ?">
                                    </Confirmation>
                                </Click>
                            </DirectEvents>
                        </ext:Button>
                        <ext:ToolbarSeparator />
                        <ext:Button ID="btnProposedReview" runat="server" Text="Xét duyệt" Icon="Tick" ToolTip="Check vào một phiếu đề nghị để xét duyệt">
                            <DirectEvents>
                                <Click OnEvent="btnProposedReview_Click">
                                    <EventMask ShowMask="true" Msg="Đang tải..." />
                                </Click>
                            </DirectEvents>
                        </ext:Button>
                        <ext:ToolbarSeparator />
                        <ext:Button ID="btnExport" runat="server" Text="Xuất tập tin" Icon="Printer">
                            <Menu>
                                <ext:Menu ID="MenuMain" runat="server">
                                    <Items>
                                        <ext:MenuItem ID="MenuItemExPortExcel" runat="server" Text="Excel" Icon="PageExcel">
                                            <DirectEvents>
                                                <Click OnEvent="MenuItemExportExcel_Click" IsUpload="true" />
                                            </DirectEvents>
                                        </ext:MenuItem>
                                    </Items>
                                </ext:Menu>
                            </Menu>
                        </ext:Button>
                        <ext:DateField ID="txtDateBeginFillter" EmptyText="Từ ngày" runat="server" MarginSpec="0 8 0 0" />
                        <ext:DateField ID="txtDateEndFillter" EmptyText="Đến ngày" runat="server" MarginSpec="0 5 0 0" />
                        <ext:Button ID="btnFillter" runat="server" Text="Lọc" Icon="ApplicationGo" ToolTip="Chọn lọc theo ngày đặt hàng">
                            <DirectEvents>
                                <Click OnEvent="btnFillter_Click">
                                    <EventMask ShowMask="true" Msg="Đang tải..." />
                                </Click>
                            </DirectEvents>
                        </ext:Button>
                        <ext:ToolbarSeparator />
                        <ext:SelectBox
                            ID="SelectBoxReview"
                            runat="server"
                            Cls="x-select-box"
                            MarginSpec="0 8 0 0"
                            EmptyText="Chọn trạng thái">
                            <Items>
                                <ext:ListItem Value="1" Text="Đã duyệt" />
                                <ext:ListItem Value="0" Text="Chưa duyệt" />
                            </Items>
                            <DirectEvents>
                                <Select OnEvent="SelectBoxReview_Change">
                                    <EventMask ShowMask="true" Msg="Đang tải..."></EventMask>
                                </Select>
                            </DirectEvents>
                        </ext:SelectBox>
                    </Items>
                </ext:Toolbar>
                <ext:Toolbar ID="ToolbarButtom" runat="server" Dock="Bottom" AnchorHorizontal="100%">
                    <Items>
                        <ext:TriggerField ID="txtSearchProposed" runat="server" Width="200" EnableKeyEvents="true" MarginSpec="0 8 0 0">
                            <Triggers>
                                <ext:FieldTrigger Icon="Search" />
                            </Triggers>
                            <DirectEvents>
                                <TriggerClick OnEvent="Search_Event"></TriggerClick>
                                <KeyPress OnEvent="Search_Event"></KeyPress>
                                <KeyUp OnEvent="Search_Event"></KeyUp>
                            </DirectEvents>
                        </ext:TriggerField>
                        <ext:PagingToolbar ID="PagingToolbarProposed" runat="server" StoreID="StoreProposed" BeforePageText="Trang" AfterPageText="của {0}" LastText="Cuối" NextText="Kế tiếp" PrevText="Trở lại" FirstText="Đầu" RefreshText="Làm tươi" DisplayInfo="true" DisplayMsg="Trang {0} - {1} của {2}" />
                    </Items>
                </ext:Toolbar>
            </DockedItems>
        </ext:GridPanel>
    </Content>
</ext:Panel>
<ext:Panel runat="server">
    <Content>
        <%-------WindownOrderBuyWithOrder------------%>
        <ext:Window ID="WindowsProposedOrderBuyWithOrder" runat="server"
            Title="Lập phiếu đề nghị theo đơn"
            DefaultAnchor="100%"
            Width="829"
            Hidden="true"
            AutoScroll="false"
            Maximizable="False"
            Minimizable="False"
            AutoDataBind="true"
            Region="Center"
            Resizable="false"
            Modal="true"
            HideMode="Offsets"
            PaddingSummary="5px 5px 0">
            <Content>
                <ext:FormPanel ID="FormPanelProposedOrderBuyWithOrder"
                    runat="server"
                    Width="817"
                    Border="false"
                    Frame="true"
                    DefaultAnchor="100%">
                    <Items>
                        <ext:Panel ID="PanelToolBarProposedOrderBuyOrderMain"
                            runat="server"
                            Cls="width"
                            Layout="Fit"
                            Dock="Top"
                            ButtonAlign="Left"
                            AutoScroll="true">
                            <TopBar>
                                <ext:Toolbar ID="ToolbarProposedOrderBuyOrderWithOrderWindow" runat="server">
                                    <Items>
                                        <ext:Button ID="btnProposedSaveOrderBuyOrder" runat="server" Text="Cập nhật" Icon="Disk" ToolTip="Cập nhật">
                                            <DirectEvents>
                                                <Click OnEvent="btnProposedSaveOrderBuyOrder_Click">
                                                    <EventMask ShowMask="true" Msg="Đang tải..." />
                                                </Click>
                                            </DirectEvents>
                                        </ext:Button>
                                        <ext:ToolbarSeparator />
                                        <ext:Button ID="btnProposedReloadOrderBuyOrder" runat="server" Text="Làm tươi" Icon="Reload" ToolTip="Làm tươi">
                                            <DirectEvents>
                                                <Click OnEvent="btnProposedReloadOrderBuyOrder_Click">
                                                    <EventMask ShowMask="true" Msg="Đang tải..." />
                                                </Click>
                                            </DirectEvents>
                                        </ext:Button>
                                        <ext:ToolbarSeparator />
                                        <ext:Button ID="btnProposedExitToolOrderBuyOrder" runat="server" Text="Huỷ" Icon="Cancel" ToolTip="Huỷ">
                                            <DirectEvents>
                                                <Click OnEvent="btnProposedExitToolOrderBuyOrder_Click">
                                                    <EventMask ShowMask="true" Msg="Đang tải..." />
                                                </Click>
                                            </DirectEvents>
                                        </ext:Button>
                                    </Items>
                                </ext:Toolbar>
                            </TopBar>
                        </ext:Panel>
                        <ext:Container runat="server" Layout="HBoxLayout">
                            <Items>
                                <ext:FieldSet ID="FieldSetInfoLeft"
                                    runat="server"
                                    Title="Thông tin nhà cung cấp"
                                    MarginSpec="0 8 0 0"
                                    Padding="10"
                                    Height="185"
                                    ButtonAlign="Right">
                                    <Defaults>
                                        <ext:Parameter Name="Width" Value="500" />
                                        <ext:Parameter Name="LabelWidth" Value="90" />
                                    </Defaults>
                                    <Items>
                                        <ext:Container runat="server" Layout="HBoxLayout" Margins="-8">
                                            <Items>
                                                <ext:Hidden ID="txtIDKhachHangOrderBuyOrderProposed" runat="server"></ext:Hidden>
                                                <ext:TextField ID="txtCustomerAliasOrderBuyOrderProposed" ReadOnly="True" FieldCls="readonly" runat="server" FieldLabel="Mã nhà cung cấp" Margins="0 3 5 0"></ext:TextField>
                                                <ext:TextField ID="txtCustomerNameOrderBuyOrderProposed" ReadOnly="True" FieldCls="readonly" runat="server" Margins="0 3 5 0"></ext:TextField>
                                            </Items>
                                        </ext:Container>
                                        <ext:TextField ID="txt_OrderBuyOrderBuyOrderProposed" Cls="control" runat="server" FieldLabel="ID"></ext:TextField>
                                        <ext:TextField ID="txtOrder_Buy_Detail_Id" Cls="control" runat="server" FieldLabel="ID"></ext:TextField>
                                        <ext:TextField ID="txtIdCustomerOrderBuyOrderProposed" Cls="control" runat="server" FieldLabel="ID"></ext:TextField>
                                        <ext:TextField ID="txtOrderCodeOrderBuyOrderProposed" runat="server" FieldLabel="Mã số thuế"></ext:TextField>
                                        <ext:TextField ID="txtAddressOrderBuyOrderProposed" ReadOnly="True" FieldCls="readonly" runat="server" FieldLabel="Địa chỉ"></ext:TextField>
                                        <ext:TextArea ID="txtDescriptionOrderBuyOrderProposed" runat="server" FieldLabel="Diễn giải"></ext:TextArea>
                                    </Items>
                                </ext:FieldSet>
                                <ext:FieldSet ID="FieldSetInfoRight"
                                    runat="server"
                                    Title="Chứng từ"
                                    MarginSpec="0 0 10 0"
                                    Padding="10"
                                    Cls="x-fieldse"
                                    Width="276"
                                    Height="185"
                                    ButtonAlign="Right">
                                    <Defaults>
                                        <ext:Parameter Name="Width" Value="246" />
                                        <ext:Parameter Name="LabelWidth" Value="90" />
                                    </Defaults>
                                    <Items>
                                        <ext:TriggerField ID="txtOrderBuyCode" runat="server" FieldLabel="Chứng từ mua hàng">
                                            <Triggers>
                                                <ext:FieldTrigger Icon="SimpleGet" />
                                            </Triggers>
                                            <ToolTips>
                                                <ext:ToolTip ID="ToolTip1"
                                                    runat="server"
                                                    Html="Chọn vật tư từ đơn mua hàng"
                                                    AutoHide="true">
                                                </ext:ToolTip>
                                            </ToolTips>
                                            <DirectEvents>
                                                <TriggerClick OnEvent="btnChooseOrderBuyCode_Click">
                                                    <EventMask ShowMask="true" Msg="Đang tải..."></EventMask>
                                                </TriggerClick>
                                            </DirectEvents>
                                        </ext:TriggerField>
                                        <ext:TextField ID="txtChungTuOrderBuyOrderProposed" runat="server" FieldLabel="Chứng từ"></ext:TextField>
                                        <ext:DateField ID="txtNgayDatHangOrderBuyOrderProposed" runat="server" FieldLabel="Ngày đặt hàng" />
                                        <ext:DateField ID="txtNgayGiaoHangOrderBuyOrderProposed" runat="server" FieldLabel="Ngày giao hàng" />
                                    </Items>
                                </ext:FieldSet>
                            </Items>
                        </ext:Container>
                        <ext:FieldSet ID="FieldSetInfoMaterial"
                            runat="server"
                            Title="Thông tin vật tư"
                            MarginSpec="0 0 10 0"
                            Padding="10"
                            Width="270"
                            Height="230"
                            ButtonAlign="Right">
                            <Items>
                                <ext:GridPanel
                                    ID="grProposedTemp"
                                    Border="True"
                                    runat="server"
                                    AutoWidth="true"
                                    AutoScroll="true"
                                    Cls="gird"
                                    Layout="Fit"
                                    EnableColumnMove="true"
                                    Height="190">
                                    <Store>
                                        <%-------------StoreOrderBuyTemp-----------------%>
                                        <ext:Store
                                            ID="StoreProposedTemp"
                                            runat="server"
                                            OnReadData="StoreProposedTemp_RefreshData"
                                            PageSize="10">
                                            <Model>
                                                <ext:Model ID="Model3" runat="server" IDProperty="Proposed_Detail_ID">
                                                    <Fields>
                                                        <ext:ModelField Name="Rows_ID" Type="Int" />
                                                        <ext:ModelField Name="Materials_Id" Type="Int" />
                                                        <ext:ModelField Name="Materials_Name" Type="String" />
                                                        <ext:ModelField Name="Proposed_Quality" Type="Int" />
                                                        <ext:ModelField Name="Order_Detail_Price" Type="Float" />
                                                        <ext:ModelField Name="Order_Detail_CK_Percent" Type="Float" />
                                                        <ext:ModelField Name="Proposed_CK_Total" Type="Float" />
                                                        <ext:ModelField Name="Order_Detail_VAT_Percent" Type="Float" />
                                                        <ext:ModelField Name="Proposed_VAT_Total" Type="Float" />
                                                        <ext:ModelField Name="Proposed_Total_Price" Type="Float" />
                                                    </Fields>
                                                </ext:Model>
                                            </Model>
                                        </ext:Store>
                                    </Store>
                                    <ColumnModel runat="server">
                                        <Columns>
                                            <ext:Column ID="Column7" runat="server" Text="STT" Width="35" DataIndex="Rows_ID" Align="Center"></ext:Column>
                                            <ext:Column ID="Column8" runat="server" Text="ID" Width="15" DataIndex="Order_Id" Visible="false"></ext:Column>
                                            <ext:Column ID="Column9" runat="server" Text="ID Vật Tư" Width="15" Visible="false" DataIndex="Materials_Id"></ext:Column>
                                            <ext:Column ID="Column10" runat="server" Text="Tên vật tư" Width="100" DataIndex="Materials_Name" Align="Left"></ext:Column>
                                            <ext:Column ID="Column11" runat="server" Text="Số lượng" Width="50" DataIndex="Proposed_Quality" Align="Center"></ext:Column>
                                            <ext:NumberColumn ID="NumberColumn1" runat="server" Text="Đơn giá" Width="75" DataIndex="Order_Detail_Price" Format="0,00" Align="Center"></ext:NumberColumn>
                                            <ext:Column ID="Column12" runat="server" Text="% CK" Width="50" DataIndex="Order_Detail_CK_Percent" Align="Center">
                                                <Renderer Fn="pctChange" />
                                            </ext:Column>
                                            <ext:NumberColumn ID="NumberColumn2" runat="server" Text="Tiền CK" Width="75" DataIndex="Proposed_CK_Total" Format="0,00" Align="Center"></ext:NumberColumn>
                                            <ext:Column ID="Column13" runat="server" Text="% VAT" Width="50" DataIndex="Order_Detail_VAT_Percent" Align="Center">
                                                <Renderer Fn="pctChange" />
                                            </ext:Column>
                                            <ext:NumberColumn ID="NumberColumn3" runat="server" Text="Tiền VAT" Width="75" DataIndex="Proposed_VAT_Total" Format="0,00" Align="Center"></ext:NumberColumn>
                                            <ext:NumberColumn ID="NumberColumn4" runat="server" Text="Tổng tiền" Width="75" Flex="1" DataIndex="Proposed_Total_Price" Format="0,00" Align="Center" CustomSummaryType="totalCost"></ext:NumberColumn>
                                        </Columns>
                                    </ColumnModel>
                                    <SelectionModel>
                                        <ext:CellSelectionModel ID="CellSelectionModel1" runat="server">
                                            <DirectEvents>
                                                <Select OnEvent="CellProposedUpdateQualityMaterial_Click">
                                                    <EventMask ShowMask="true" Msg="Đang tải..." />
                                                </Select>
                                            </DirectEvents>
                                        </ext:CellSelectionModel>
                                    </SelectionModel>
                                    <BottomBar>
                                        <ext:PagingToolbar ID="PagingToolbarProposedOrderBuyOrderBuyWindow" runat="server" StoreID="StoreProposedTemp" EmptyMsg="Không có dữ liệu" BeforePageText="Trang" AfterPageText="của {0}" LastText="Cuối" NextText="Kế tiếp" PrevText="Trở lại" FirstText="Đầu" RefreshText="Làm tươi" DisplayInfo="true" DisplayMsg="Trang {0} - {1} của {2}" />
                                    </BottomBar>
                                </ext:GridPanel>
                            </Items>
                        </ext:FieldSet>
                    </Items>
                </ext:FormPanel>
                <ext:Hidden ID="HD_OrderIdBuyOrder" runat="server"></ext:Hidden>
            </Content>
        </ext:Window>
        <%-------WindownOrderBuyWithOrderEdit------------%>
        <ext:Window ID="WindownProposedOrderBuyWithOrderEdit" runat="server"
            Title="Thay đổi phiếu đề nghị theo đơn"
            DefaultAnchor="100%"
            Width="829"
            Height="605"
            Hidden="true"
            AutoScroll="false"
            Maximizable="False"
            Minimizable="False"
            AutoDataBind="true"
            Region="Center"
            Resizable="false"
            Modal="true"
            HideMode="Offsets">
            <Content>
                <ext:FormPanel ID="FormPanelProposedOrderBuyWithOrderEdit"
                    runat="server"
                    Width="817"
                    Height="569"
                    Border="false"
                    Frame="true"
                    DefaultAnchor="100%">
                    <Items>
                        <ext:Panel ID="PanelProposedOrderBuyWithOrderEdit"
                            runat="server"
                            Cls="width"
                            Layout="Fit"
                            Dock="Top"
                            ButtonAlign="Left"
                            AutoScroll="true">
                            <TopBar>
                                <ext:Toolbar ID="ToolbarProposedOrderBuyWithOrderEdit" runat="server">
                                    <Items>
                                        <ext:Button ID="btnProposedSaveOrderBuyWithOrderEdit" runat="server" Text="Cập nhật" Icon="Disk" ToolTip="Cập nhật">
                                            <DirectEvents>
                                                <Click OnEvent="btnProposedSaveOrderBuyWithOrderEdit_Click">
                                                    <EventMask ShowMask="true" Msg="Đang tải..." />
                                                </Click>
                                            </DirectEvents>
                                        </ext:Button>
                                        <ext:ToolbarSeparator />
                                        <ext:Button ID="btnProposedReloadOrderBuyWithOrderEdit" runat="server" Text="Làm tươi" Icon="Reload" ToolTip="Làm tươi">
                                            <DirectEvents>
                                                <Click OnEvent="btnProposedReloadOrderBuyWithOrderEdit_Click">
                                                    <EventMask ShowMask="true" Msg="Đang tải..." />
                                                </Click>
                                            </DirectEvents>
                                        </ext:Button>
                                        <ext:ToolbarSeparator />
                                        <ext:Button ID="btnProposedExitbtnReloadOrderBuyWithOrderEdit" runat="server" Text="Huỷ" Icon="Cancel" ToolTip="Huỷ">
                                            <DirectEvents>
                                                <Click OnEvent="btnProposedExitOrderBuyWithOrderEdit_Click">
                                                    <EventMask ShowMask="true" Msg="Đang tải..." />
                                                </Click>
                                            </DirectEvents>
                                        </ext:Button>
                                    </Items>
                                </ext:Toolbar>
                            </TopBar>
                        </ext:Panel>
                        <ext:Container runat="server" Layout="HBoxLayout">
                            <Items>
                                <ext:FieldSet ID="FieldSetProposedOrderBuyWithOrderEdit"
                                    runat="server"
                                    Title="Thông tin nhà cung cấp"
                                    MarginSpec="0 8 0 0"
                                    Padding="10"
                                    Height="185"
                                    ButtonAlign="Right">
                                    <Defaults>
                                        <ext:Parameter Name="Width" Value="500" />
                                        <ext:Parameter Name="LabelWidth" Value="90" />
                                    </Defaults>
                                    <Items>
                                        <ext:Container runat="server" Layout="HBoxLayout" Margins="-8">
                                            <Items>
                                                <ext:Hidden ID="hdId_CustomerOrderBuyWithOrderEdit" runat="server"></ext:Hidden>
                                                <ext:TextField ID="txtAlias_OrderBuyWithOrderEdit" ReadOnly="True" FieldCls="readonly" runat="server" FieldLabel="Mã nhà cung cấp" Margins="0 3 5 0"></ext:TextField>
                                                <ext:TextField ID="txtName_OrderBuyWithOrderEdit" ReadOnly="True" FieldCls="readonly" runat="server" Margins="0 3 5 0"></ext:TextField>
                                            </Items>
                                        </ext:Container>
                                        <ext:TextField ID="txtTaxCode_OrderBuyWithOrderEdit" runat="server" FieldLabel="Mã số thuế"></ext:TextField>
                                        <ext:TextField ID="txtAddress_OrderBuyWithOrderEdit" ReadOnly="True" FieldCls="readonly" runat="server" FieldLabel="Địa chỉ"></ext:TextField>
                                        <ext:TextArea ID="txtDescriptstion_OrderBuyWithOrderEdit" runat="server" FieldLabel="Diễn giải"></ext:TextArea>
                                    </Items>
                                </ext:FieldSet>
                                <ext:FieldSet ID="FieldSetTaxtCodeOrderBuyWithOrderEdit"
                                    runat="server"
                                    Title="Chứng từ"
                                    MarginSpec="0 0 10 0"
                                    Padding="10"
                                    Cls="x-fieldse"
                                    Width="276"
                                    Height="185"
                                    ButtonAlign="Right">
                                    <Defaults>
                                        <ext:Parameter Name="Width" Value="246" />
                                        <ext:Parameter Name="LabelWidth" Value="90" />
                                    </Defaults>
                                    <Items>
                                        <ext:TriggerField ID="txtTaxCodeOrderBuyWithOrderEdit" runat="server" FieldLabel="Chứng từ mua hàng">
                                            <Triggers>
                                                <ext:FieldTrigger Icon="SimpleGet" />
                                            </Triggers>
                                            <ToolTips>
                                                <ext:ToolTip ID="ToolTip2"
                                                    runat="server"
                                                    Html="Chọn vật tư từ đơn mua hàng"
                                                    AutoHide="true">
                                                </ext:ToolTip>
                                            </ToolTips>
                                            <DirectEvents>
                                                <TriggerClick OnEvent="btnChooseOrderBuyCodeEdit_Click">
                                                    <EventMask ShowMask="true" Msg="Đang tải..."></EventMask>
                                                </TriggerClick>
                                            </DirectEvents>
                                        </ext:TriggerField>
                                        <ext:TextField ID="txtChungTuNhapOrderBuyWithOrderEdit" runat="server" FieldLabel="Chứng từ"></ext:TextField>
                                        <ext:DateField ID="txtNgayDatHang_OrderBuyWithOrderEdit" runat="server" FieldLabel="Ngày đặt hàng" />
                                        <ext:DateField ID="txtNgayGiaoHang_OrderBuyWithOrderEdit" runat="server" FieldLabel="Ngày giao hàng" />
                                    </Items>
                                </ext:FieldSet>
                            </Items>
                        </ext:Container>
                        <ext:FieldSet ID="FieldSetInfoMaterialOrderBuyWithOrderEdit"
                            runat="server"
                            Title="Thông tin vật tư"
                            MarginSpec="0 0 10 0"
                            Padding="10"
                            Width="270"
                            Height="230"
                            ButtonAlign="Right">
                            <Items>
                                <ext:GridPanel
                                    ID="grProposedTempOrderBuyWithOrderBuyEdit"
                                    Border="True"
                                    runat="server"
                                    AutoWidth="true"
                                    AutoScroll="true"
                                    Cls="gird"
                                    Layout="Fit"
                                    EnableColumnMove="true"
                                    Height="190">
                                    <Store>
                                        <%-------------StoreOrderBuyEdit-----------------%>
                                        <ext:Store
                                            ID="StoreOrderBuyProposedEdit"
                                            runat="server"
                                            OnReadData="StoreOrderBuyProposedEdit_RefreshData"
                                            PageSize="10">
                                            <Model>
                                                <ext:Model ID="Model5" runat="server" IDProperty="Proposed_Detail_ID">
                                                    <Fields>
                                                        <ext:ModelField Name="Rows_ID" Type="Int" />
                                                        <ext:ModelField Name="Materials_Id" Type="Int" />
                                                        <ext:ModelField Name="Materials_Name" Type="String" />
                                                        <ext:ModelField Name="Proposed_Quality" Type="Int" />
                                                        <ext:ModelField Name="Proposed_Price" Type="Float" />
                                                        <ext:ModelField Name="Proposed_Percent_CK" Type="Float" />
                                                        <ext:ModelField Name="Proposed_CK_Total" Type="Float" />
                                                        <ext:ModelField Name="Proposed_Percent_VAT" Type="Float" />
                                                        <ext:ModelField Name="Proposed_VAT_Total" Type="Float" />
                                                        <ext:ModelField Name="Proposed_Total_Price" Type="Float" />
                                                    </Fields>
                                                </ext:Model>
                                            </Model>
                                        </ext:Store>
                                    </Store>
                                    <ColumnModel runat="server">
                                        <Columns>
                                            <ext:Column runat="server" Text="STT" Width="35" DataIndex="Rows_ID" Align="Center"></ext:Column>
                                            <ext:Column runat="server" Text="ID Vật Tư" Width="15" Visible="false" DataIndex="Materials_Id"></ext:Column>
                                            <ext:Column runat="server" Text="Tên vật tư" Width="100" DataIndex="Materials_Name" Align="Left"></ext:Column>
                                            <ext:Column runat="server" Text="Số lượng" Width="50" DataIndex="Proposed_Quality" Align="Center"></ext:Column>
                                            <ext:NumberColumn runat="server" Text="Đơn giá" Width="75" DataIndex="Proposed_Price" Format="0,00" Align="Center"></ext:NumberColumn>
                                            <ext:Column runat="server" Text="% CK" Width="50" DataIndex="Proposed_Percent_CK" Align="Center">
                                                <Renderer Fn="pctChange" />
                                            </ext:Column>
                                            <ext:NumberColumn runat="server" Text="Tiền CK" Width="75" DataIndex="Proposed_CK_Total" Format="0,00" Align="Center"></ext:NumberColumn>
                                            <ext:Column runat="server" Text="% VAT" Width="50" DataIndex="Proposed_Percent_VAT" Align="Center">
                                                <Renderer Fn="pctChange" />
                                            </ext:Column>
                                            <ext:NumberColumn runat="server" Text="Tiền VAT" Width="75" DataIndex="Proposed_VAT_Total" Format="0,00" Align="Center"></ext:NumberColumn>
                                            <ext:NumberColumn runat="server" Text="Tổng tiền" Width="75" Flex="1" DataIndex="Proposed_Total_Price" Format="0,00" Align="Center" CustomSummaryType="totalCost"></ext:NumberColumn>
                                        </Columns>
                                    </ColumnModel>
                                    <SelectionModel>
                                        <ext:CellSelectionModel runat="server">
                                            <DirectEvents>
                                                <Select OnEvent="CellProposedUpdateQualityMaterialOrderBuyEdit_Click">
                                                    <EventMask ShowMask="true" Msg="Đang tải..." />
                                                </Select>
                                            </DirectEvents>
                                        </ext:CellSelectionModel>
                                    </SelectionModel>
                                    <BottomBar>
                                        <ext:PagingToolbar ID="PagingToolbarlProposedOrderBuyEdit" runat="server" StoreID="StoreOrderBuyProposedEdit" EmptyMsg="Không có dữ liệu" BeforePageText="Trang" AfterPageText="của {0}" LastText="Cuối" NextText="Kế tiếp" PrevText="Trở lại" FirstText="Đầu" RefreshText="Làm tươi" DisplayInfo="true" DisplayMsg="Trang {0} - {1} của {2}" />
                                    </BottomBar>
                                </ext:GridPanel>
                            </Items>
                        </ext:FieldSet>
                        <ext:FieldSet ID="FieldSetOrderBuyWithOrderSumEdit"
                            runat="server"
                            Title="Tổng tiền các mặt hàng"
                            MarginSpec="0 8 0 0"
                            Padding="10"
                            Layout="Fit"
                            ButtonAlign="Right">
                            <Items>
                                <ext:Container runat="server" Layout="HBoxLayout">
                                    <Items>
                                        <ext:Label runat="server" Text="Tổng số lượng vật tư:" MarginSpec="0 8 8 0"></ext:Label>
                                        <ext:Label ID="lbQualityWithOrderEdit" Cls="x-label-right-cost" runat="server" Text="0" Width="80"></ext:Label>

                                        <ext:Label runat="server" Text="Tổng đơn giá:" MarginSpec="0 8 8 0"></ext:Label>
                                        <ext:Label ID="lbPriceWithOrderEdit" Cls="x-label-right-cost" runat="server" Text="0" Width="80"></ext:Label>

                                        <ext:Label runat="server" Text="Tổng tiền CK:" MarginSpec="0 8 8 0"></ext:Label>
                                        <ext:Label ID="lbPriCKWithOrderEdit" Cls="x-label-right-cost" runat="server" Text="0" Width="80"></ext:Label>

                                        <ext:Label runat="server" Text="Tổng tiền VAT:" MarginSpec="0 8 8 0"></ext:Label>
                                        <ext:Label ID="lbPriVATWithOrderEdit" Cls="x-label-right-cost" runat="server" Text="0" Width="80"></ext:Label>
                                    </Items>
                                </ext:Container>

                                <ext:Container runat="server" Layout="HBoxLayout">
                                    <Items>
                                        <ext:Label runat="server" Text="Tổng tiền các mặt hàng bao gồm CK và VAT:" MarginSpec="0 8 8 0"></ext:Label>
                                        <ext:Label ID="lbTotalCostOrderWithOrderEdit" Cls="x-label-right-cost" runat="server" Text="0"></ext:Label>
                                    </Items>
                                </ext:Container>
                            </Items>
                        </ext:FieldSet>
                        <ext:Hidden ID="HdReviewIsActiveEdit" runat="server"></ext:Hidden>
                    </Items>
                </ext:FormPanel>
                <ext:Hidden ID="HD_OrderIdBuyOrderEdit" runat="server"></ext:Hidden>
            </Content>
        </ext:Window>
        <%------------Material--With-Order--------------%>
        <ext:Window ID="WindowMaterialWithOrder" runat="server"
            Title="Thông tin vật tư"
            DefaultAnchor="100%"
            Width="829"
            Height="400"
            Hidden="true"
            AutoScroll="false"
            Maximizable="False"
            Minimizable="False"
            AutoDataBind="true"
            Region="Center"
            Resizable="False"
            Modal="true"
            Layout="Fit"
            HideMode="Offsets">
            <Content>
                <ext:GridPanel
                    ID="grMaterialWithOrder"
                    Border="True"
                    runat="server"
                    AutoWidth="true"
                    AutoScroll="true"
                    Cls="gird"
                    EnableColumnMove="true">
                    <Store>
                        <%--------------StoreMaterial-----------------%>
                        <ext:Store
                            ID="StoreMaterialOrderBuyCode"
                            runat="server"
                            OnReadData="StoreMaterialOrderBuyCode_RefreshData"
                            PageSize="10">
                            <Model>
                                <ext:Model ID="Model2" runat="server" IDProperty="Order_Buy_Detail_Id">
                                    <Fields>
                                        <ext:ModelField Name="Rows_ID" Type="Int" />
                                        <ext:ModelField Name="Materials_Alias" Type="String" />
                                        <ext:ModelField Name="Materials_Name" Type="String" />
                                        <ext:ModelField Name="Order_Detail_Quality_Remain" Type="Int" />
                                        <ext:ModelField Name="Materials_Type_Name" Type="String" />
                                        <ext:ModelField Name="Unit_Name" Type="String" />
                                    </Fields>
                                </ext:Model>
                            </Model>
                        </ext:Store>
                    </Store>
                    <ColumnModel runat="server">
                        <Columns>
                            <ext:Column ID="Column27" runat="server" Text="STT" Width="35" DataIndex="Rows_ID" Align="Center"></ext:Column>
                            <ext:Column ID="Column28" runat="server" Text="ID" Width="15" DataIndex="Materials_Id" Visible="false"></ext:Column>
                            <ext:Column ID="Column29" runat="server" Text="Mã vật tư" Width="100" DataIndex="Materials_Alias" Align="Left"></ext:Column>
                            <ext:Column ID="Column30" runat="server" Text="Tên vật tư" Width="200" DataIndex="Materials_Name" Align="Left"></ext:Column>
                            <ext:Column ID="Column14" runat="server" Text="Số lượng hiện tại" Width="100" DataIndex="Order_Detail_Quality_Remain" Align="Center"></ext:Column>
                            <ext:Column ID="Column31" runat="server" Text="Loại vật tư" Width="200" DataIndex="Materials_Type_Name" Align="Left"></ext:Column>
                            <ext:Column ID="Column32" runat="server" Text="Đơn vị tính" Width="200" DataIndex="Unit_Name" Align="Center" Flex="1"></ext:Column>
                        </Columns>
                    </ColumnModel>
                    <SelectionModel>
                        <ext:CheckboxSelectionModel runat="server" Mode="Multi"></ext:CheckboxSelectionModel>
                    </SelectionModel>
                    <TopBar>
                        <ext:Toolbar ID="ToolbarMaterialWithOrder" runat="server">
                            <Items>
                                <ext:Button ID="btnSelectMaterial" runat="server" Text="Chọn vật tư" Icon="Accept" ToolTip="Chọn vật tư">
                                    <DirectEvents>
                                        <Click OnEvent="btnSelectMaterial_Click">
                                            <EventMask ShowMask="true" Msg="Đang tải..." />
                                        </Click>
                                    </DirectEvents>
                                </ext:Button>
                                <ext:ToolbarSeparator />
                                <ext:SelectBox
                                    ID="SelectBoxOrderCode"
                                    runat="server"
                                    Cls="x-select-box"
                                    DisplayField="Order_Buy_Code"
                                    ValueField="Order_Buy_Id"
                                    EmptyText="Chọn đơn mua hàng">
                                    <Store>
                                        <ext:Store ID="StoreOrderCodeSelectBox" runat="server">
                                            <Model>
                                                <ext:Model ID="Model1" runat="server">
                                                    <Fields>
                                                        <ext:ModelField Name="Order_Buy_Code" />
                                                        <ext:ModelField Name="Order_Buy_Id" />
                                                    </Fields>
                                                </ext:Model>
                                            </Model>
                                        </ext:Store>
                                    </Store>
                                    <Triggers>
                                        <ext:FieldTrigger Icon="Ellipsis" Qtip="Tải lại" />
                                    </Triggers>
                                    <DirectEvents>
                                        <Select OnEvent="SelectIndex_Change">
                                            <EventMask ShowMask="true" Msg="Đang tải..."></EventMask>
                                        </Select>
                                        <TriggerClick OnEvent="Refresh_Click">
                                            <EventMask ShowMask="true" Msg="Đang tải..."></EventMask>
                                        </TriggerClick>
                                    </DirectEvents>
                                </ext:SelectBox>
                            </Items>
                        </ext:Toolbar>
                    </TopBar>
                    <DockedItems>
                        <ext:Toolbar ID="ToolBarMaterial" runat="server" Dock="Bottom" AnchorHorizontal="100%">
                            <Items>
                                <ext:TriggerField ID="txtSearchMaterial" runat="server" Width="200" EnableKeyEvents="true" MarginSpec="0 8 0 0">
                                    <Triggers>
                                        <ext:FieldTrigger Icon="Search" />
                                    </Triggers>
                                    <DirectEvents>
                                        <TriggerClick OnEvent="SearchMaterial_Event"></TriggerClick>
                                        <KeyPress OnEvent="SearchMaterial_Event"></KeyPress>
                                        <KeyUp OnEvent="SearchMaterial_Event"></KeyUp>
                                    </DirectEvents>
                                </ext:TriggerField>
                                <ext:PagingToolbar ID="PagingToolbarMaterialWithOrder" runat="server" StoreID="StoreMaterialOrderBuyCode" BeforePageText="Trang" AfterPageText="của {0}" LastText="Cuối" NextText="Kế tiếp" PrevText="Trở lại" FirstText="Đầu" RefreshText="Làm tươi" DisplayInfo="true" DisplayMsg="Trang {0} - {1} của {2}" />
                            </Items>
                        </ext:Toolbar>
                    </DockedItems>
                </ext:GridPanel>
            </Content>
        </ext:Window>
        <%-------UpdateQualityMaterial-----------%>
        <ext:Window ID="WindowProposedUpdateQualityProposedMaterial" runat="server"
            Title="Cập nhật số lượng vật tư"
            DefaultAnchor="100%"
            Width="400"
            Height="90"
            Hidden="true"
            Closable="false"
            AutoScroll="false"
            Maximizable="False"
            Minimizable="False"
            AutoDataBind="true"
            Region="Center"
            Resizable="False"
            Modal="true"
            Layout="Fit"
            HideMode="Offsets">

            <Content>
                <ext:FormPanel ID="FormPanelProposedUpdateQuality"
                    runat="server"
                    BodyPadding="6"
                    Height="170"
                    Border="false"
                    AutoFocus="true"
                    Cls="white-footer"
                    DefaultButton="btnProposedUpdateQuality"
                    DefaultAnchor="100%">
                    <Items>
                        <ext:Hidden runat="server"
                            ID="hdOrder_Buy_Detail_Id">
                        </ext:Hidden>
                        <ext:Hidden runat="server"
                            ID="hdIdOrderTemp">
                        </ext:Hidden>
                        <ext:Hidden runat="server"
                            ID="hdChietKhau">
                        </ext:Hidden>
                        <ext:Hidden runat="server"
                            ID="hdVAT">
                        </ext:Hidden>
                        <ext:Hidden runat="server"
                            ID="hdPrice">
                        </ext:Hidden>
                        <ext:Hidden runat="server"
                            ID="hdMaterial">
                        </ext:Hidden>
                        <ext:Hidden runat="server"
                            ID="hdQualityRemain">
                        </ext:Hidden>
                        <ext:Hidden runat="server"
                            ID="hdOrderQuanlity">
                        </ext:Hidden>
                        <ext:Hidden runat="server"
                            ID="hdNameMaterial">
                        </ext:Hidden>
                        <ext:NumberField
                            runat="server"
                            ID="txtSoLuong"
                            FieldLabel="Số lượng">
                        </ext:NumberField>
                    </Items>
                    <Buttons>
                        <ext:Button runat="server" Text="Cập nhập" ID="btnProposedUpdateQuality" Icon="Disk">
                            <DirectEvents>
                                <Click OnEvent="btnProposedUpdateQuality_Click">
                                    <EventMask ShowMask="true" Msg="Đang tải..." />
                                </Click>
                            </DirectEvents>
                        </ext:Button>

                        <ext:Button runat="server" ID="btnProposedCancelOrder" Text="Bỏ qua" Icon="Decline">
                            <DirectEvents>
                                <Click OnEvent="btnProposedCancelOrder_Click">
                                    <EventMask ShowMask="true" Msg="Đang tải..." />
                                </Click>
                            </DirectEvents>
                        </ext:Button>
                    </Buttons>
                </ext:FormPanel>
            </Content>
        </ext:Window>
        <%--------WindowsOrderReview-------------%>
        <ext:Window ID="WindowProposedOrderReview" runat="server"
            Title="Xét duyệt phiếu đề nghị nhập kho"
            DefaultAnchor="100%"
            Width="829"
            Height="605"
            Hidden="true"
            AutoScroll="false"
            Maximizable="False"
            Minimizable="False"
            AutoDataBind="true"
            Region="Center"
            Resizable="false"
            Modal="true"
            HideMode="Offsets">
            <Content>
                <ext:Panel ID="PanelToolbarProposedReview"
                    runat="server"
                    Cls="width"
                    Layout="Fit"
                    Dock="Top"
                    ButtonAlign="Left"
                    AutoScroll="true">
                    <DockedItems>
                        <ext:Toolbar ID="ToolbarProposedReview" runat="server" Dock="Top">
                            <Items>
                                <ext:Button ID="btnProposedReviewWindow" runat="server" Text="Xét duyệt" Icon="Tick" ToolTip="Xét duyệt mẫu tin">
                                    <DirectEvents>
                                        <Click OnEvent="btnProposedReviewWindow_Click">
                                            <EventMask ShowMask="true" Msg="Đang tải..." />
                                            <Confirmation ConfirmRequest="true"
                                                Title="Thông Báo" Message="Bạn có muốn xét duyệt đơn đặt hàng này không ?">
                                            </Confirmation>
                                        </Click>
                                    </DirectEvents>
                                </ext:Button>
                                <ext:ToolbarSeparator />
                                <ext:Button ID="btnProposedUnReviewWindow" runat="server" Text="Bỏ xét duyệt" Icon="Cross" ToolTip="Huỷ xét duyệt mẫu tin">
                                    <DirectEvents>
                                        <Click OnEvent="btnProposedUnReviewWindow_Click">
                                            <EventMask ShowMask="true" Msg="Đang tải..." />
                                            <Confirmation ConfirmRequest="true"
                                                Title="Thông Báo" Message="Bạn có muốn huỷ xét duyệt đơn đặt hàng này không ?">
                                            </Confirmation>
                                        </Click>
                                    </DirectEvents>
                                </ext:Button>
                                <ext:ToolbarSeparator />
                                <ext:Button ID="btnProposedReLoadReviewOrder" runat="server" Text="Làm tươi" Icon="Reload" ToolTip="Làm tươi">
                                    <DirectEvents>
                                        <Click OnEvent="btnProposedReLoadReviewOrder_Click">
                                            <EventMask ShowMask="true" Msg="Đang tải..." />
                                        </Click>
                                    </DirectEvents>
                                </ext:Button>
                                <ext:ToolbarSeparator />
                                <ext:Button ID="btnPrintProposedReviewOrder" runat="server" Text="In phiếu" Icon="Printer" ToolTip="In phiếu đề nghị nhập kho" OnClientClick="window.print();"></ext:Button>
                                <ext:ToolbarSeparator />
                                <ext:Button ID="btnProposedExitReviewOrder" runat="server" Text="Đóng lại" Icon="Cancel" ToolTip="Đóng cửa sổ xét duyệt">
                                    <DirectEvents>
                                        <Click OnEvent="btnProposedExitReviewOrder_Click">
                                            <EventMask ShowMask="true" Msg="Đang tải..." />
                                        </Click>
                                    </DirectEvents>
                                </ext:Button>
                            </Items>
                        </ext:Toolbar>
                    </DockedItems>
                </ext:Panel>
                <ext:FormPanel ID="FormPanelProposedReview"
                    runat="server"
                    Width="817"
                    Height="569"
                    Border="false"
                    Frame="true"
                    DefaultAnchor="100%">
                    <Items>
                        <ext:FieldSet ID="FieldSetProposedReviewInfo"
                            runat="server"
                            Title="Thông tin khách hàng"
                            MarginSpec="0 8 0 0"
                            Padding="10"
                            Height="210px"
                            ButtonAlign="Right">
                            <Defaults>
                                <ext:Parameter Name="Width" Value="500" />
                                <ext:Parameter Name="LabelWidth" Value="90" />
                            </Defaults>
                            <Items>
                                <ext:Container runat="server" Layout="HBoxLayout">
                                    <Items>
                                        <ext:Hidden ID="HDProposed_OrderIdBuyOrderEdit" runat="server"></ext:Hidden>
                                        <ext:Label runat="server" Text="Mã khách hàng:" MarginSpec="0 8 15 0"></ext:Label>
                                        <ext:Label ID="lbProposedReviewCustomer_Alias" Cls="x-label-right" runat="server" Text=""></ext:Label>
                                    </Items>
                                </ext:Container>

                                <ext:Container runat="server" Layout="HBoxLayout">
                                    <Items>
                                        <ext:Label runat="server" Text="Tên khách hàng:" MarginSpec="0 8 15 0"></ext:Label>
                                        <ext:Label ID="lbProposedReviewCustomer_Name" Cls="x-label-right" runat="server" Text=""></ext:Label>
                                    </Items>
                                </ext:Container>

                                <ext:Container runat="server" Layout="HBoxLayout">
                                    <Items>
                                        <ext:Label runat="server" Text="Chứng từ nhập:" MarginSpec="0 8 15 0"></ext:Label>
                                        <ext:Label ID="lbProposedReviewOrderCode" Cls="x-label-right" runat="server" Text=""></ext:Label>
                                    </Items>
                                </ext:Container>

                                <ext:Container runat="server" Layout="HBoxLayout">
                                    <Items>
                                        <ext:Label runat="server" Text="Ngày đặt hàng:" MarginSpec="0 8 15 0"></ext:Label>
                                        <ext:Label ID="lbProposedReviewOrderDate" Cls="x-label-right" runat="server" Text=""></ext:Label>
                                    </Items>
                                </ext:Container>

                                <ext:Container runat="server" Layout="HBoxLayout">
                                    <Items>
                                        <ext:Label runat="server" Text="Ngày duyệt/huỷ:" MarginSpec="0 8 15 0"></ext:Label>
                                        <ext:Label ID="lbProposedReviewDateUpdate" Cls="x-label-right" runat="server" Text=""></ext:Label>
                                    </Items>
                                </ext:Container>

                                <ext:Container runat="server" Layout="HBoxLayout">
                                    <Items>
                                        <ext:Label runat="server" Text="Thời gian duyệt/huỷ vào lúc:" MarginSpec="0 8 15 0"></ext:Label>
                                        <ext:Label ID="lbProposedReViewTime" Cls="x-label-right" runat="server" Text=""></ext:Label>
                                    </Items>
                                </ext:Container>
                            </Items>
                        </ext:FieldSet>
                        <ext:FieldSet ID="FieldSetReviewInfoMaterial"
                            runat="server"
                            Title="Thông tin vật tư"
                            MarginSpec="0 8 0 0"
                            Padding="10"
                            Layout="Fit"
                            ButtonAlign="Right">
                            <Items>
                                <ext:GridPanel
                                    ID="grProposedOrderReview"
                                    Border="True"
                                    runat="server"
                                    AutoWidth="true"
                                    AutoScroll="true"
                                    Cls="gird"
                                    Layout="Fit"
                                    EnableColumnMove="true"
                                    Height="240">
                                    <Store>
                                        <%-------------StoreOrderReview-----------------%>
                                        <ext:Store
                                            ID="StoreOrderProposedReview"
                                            runat="server"
                                            OnReadData="StoreOrderProposedReview_RefreshData"
                                            PageSize="10">
                                            <Model>
                                                <ext:Model ID="Model6" runat="server" IDProperty="Proposed_Detail_ID">
                                                    <Fields>
                                                        <ext:ModelField Name="Rows_ID" Type="Int" />
                                                        <ext:ModelField Name="Materials_Id" Type="Int" />
                                                        <ext:ModelField Name="Materials_Name" Type="String" />
                                                        <ext:ModelField Name="Proposed_Quality" Type="Int" />
                                                        <ext:ModelField Name="Proposed_Price" Type="Float" />
                                                        <ext:ModelField Name="Proposed_Percent_CK" Type="Float" />
                                                        <ext:ModelField Name="Proposed_CK_Total" Type="Float" />
                                                        <ext:ModelField Name="Proposed_Percent_VAT" Type="Float" />
                                                        <ext:ModelField Name="Proposed_VAT_Total" Type="Float" />
                                                        <ext:ModelField Name="Proposed_Total_Price" Type="Float" />
                                                    </Fields>
                                                </ext:Model>
                                            </Model>
                                        </ext:Store>
                                    </Store>
                                    <ColumnModel runat="server">
                                        <Columns>
                                            <ext:Column ID="Column15" runat="server" Text="STT" Width="35" DataIndex="Rows_ID" Align="Center"></ext:Column>
                                            <ext:Column ID="Column16" runat="server" Text="ID Vật Tư" Width="15" Visible="false" DataIndex="Materials_Id"></ext:Column>
                                            <ext:Column ID="Column17" runat="server" Text="Tên vật tư" Width="100" DataIndex="Materials_Name" Align="Left"></ext:Column>
                                            <ext:Column ID="Column18" runat="server" Text="Số lượng" Width="50" DataIndex="Proposed_Quality" Align="Center"></ext:Column>
                                            <ext:NumberColumn ID="NumberColumn5" runat="server" Text="Đơn giá" Width="75" DataIndex="Proposed_Price" Format="0,00" Align="Center"></ext:NumberColumn>
                                            <ext:Column ID="Column19" runat="server" Text="% CK" Width="50" DataIndex="Proposed_Percent_CK" Align="Center">
                                                <Renderer Fn="pctChange" />
                                            </ext:Column>
                                            <ext:NumberColumn ID="NumberColumn6" runat="server" Text="Tiền CK" Width="75" DataIndex="Proposed_CK_Total" Format="0,00" Align="Center"></ext:NumberColumn>
                                            <ext:Column ID="Column20" runat="server" Text="% VAT" Width="50" DataIndex="Proposed_Percent_VAT" Align="Center">
                                                <Renderer Fn="pctChange" />
                                            </ext:Column>
                                            <ext:NumberColumn ID="NumberColumn7" runat="server" Text="Tiền VAT" Width="75" DataIndex="Proposed_VAT_Total" Format="0,00" Align="Center"></ext:NumberColumn>
                                            <ext:NumberColumn ID="NumberColumn8" runat="server" Text="Tổng tiền" Width="75" Flex="1" DataIndex="Proposed_Total_Price" Format="0,00" Align="Center" CustomSummaryType="totalCost"></ext:NumberColumn>
                                        </Columns>
                                    </ColumnModel>
                                    <BottomBar>
                                        <ext:PagingToolbar ID="PagingToolbarProposedReview" runat="server" StoreID="StoreOrderProposedReview" EmptyMsg="Không có dữ liệu" BeforePageText="Trang" AfterPageText="của {0}" LastText="Cuối" NextText="Kế tiếp" PrevText="Trở lại" FirstText="Đầu" RefreshText="Làm tươi" DisplayInfo="true" DisplayMsg="Trang {0} - {1} của {2}" />
                                    </BottomBar>
                                </ext:GridPanel>
                                <ext:Hidden ID="HdProposedReviewOrder_Id" runat="server"></ext:Hidden>
                                <ext:Hidden ID="HdProposedReviewIsActive" runat="server"></ext:Hidden>
                            </Items>
                        </ext:FieldSet>
                        <ext:FieldSet ID="FieldSetProposedReViewTotal"
                            runat="server"
                            Title="Tổng tiền các mặt hàng"
                            MarginSpec="0 8 0 0"
                            Padding="10"
                            Layout="Fit"
                            ButtonAlign="Right">
                            <Items>
                                <ext:Container runat="server" Layout="HBoxLayout">
                                    <Items>
                                        <ext:Label runat="server" Text="Tổng tiền các mặt hàng:" MarginSpec="0 8 8 0"></ext:Label>
                                        <ext:Label ID="lbTotalProposedMaterialReview" Cls="x-label-right-cost" runat="server" Text=""></ext:Label>
                                    </Items>
                                </ext:Container>
                            </Items>
                        </ext:FieldSet>
                    </Items>
                </ext:FormPanel>
            </Content>
        </ext:Window>
    </Content>
</ext:Panel>
